/* ================================================
   SETTINGS VIEW - BEM STRUCTURE
   ================================================ */

/* Settings Container - Root Block */
.tasknotes-plugin .settings-view {
    padding: var(--tn-spacing-md);
    height: 100%;
    overflow-y: auto;
    background: var(--tn-bg-primary);
}

/* ================================================
   TAB NAVIGATION
   ================================================ */

/* Tab Navigation Container */
.tasknotes-plugin .settings-view__tab-nav {
    display: flex;
    gap: var(--tn-spacing-xs);
    margin-bottom: var(--tn-spacing-lg);
    border-bottom: 1px solid var(--tn-border-color);
    padding-bottom: var(--tn-spacing-sm);
    overflow-x: auto;
    white-space: nowrap;
}

/* Use consistent button system */
.tasknotes-plugin .settings-view__tab-button {
    /* Remove individual styles - use tn-btn tn-btn--ghost classes */
    white-space: nowrap;
    flex-shrink: 0;
}

.tasknotes-plugin .settings-view__tab-button--active {
    background: var(--tn-interactive-accent);
    color: var(--text-on-accent);
}

/* ================================================
   TAB CONTENT
   ================================================ */

/* Tab Contents Container */
.tasknotes-plugin .settings-view__tab-contents {
    position: relative;
    min-height: 400px;
}

/* Tab Content Panel */
.tasknotes-plugin .settings-view__tab-content {
    display: none;
}

.tasknotes-plugin .settings-view__tab-content--active {
    display: block;
    animation: tn-settings-fade-in 0.2s ease-in-out;
}

@keyframes tn-settings-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================
   WARNING AND HELP SECTIONS
   ================================================ */

/* Warning Box */
.tasknotes-plugin .settings-view__warning {
    background: var(--tn-bg-error);
    border: 1px solid var(--tn-text-error);
    border-radius: var(--tn-radius-sm);
    padding: var(--tn-spacing-md);
    margin-bottom: var(--tn-spacing-lg);
    color: var(--tn-text-error);
    font-size: var(--tn-font-size-sm);
    line-height: 1.4;
}

.tasknotes-plugin .settings-view__warning-icon {
    font-weight: var(--tn-font-weight-bold);
    margin-right: var(--tn-spacing-xs);
}

/* ================================================
   EXPLANATORY SECTIONS - MINIMALIST STYLING
   ================================================ */

/* Main Help Section Container */
.tasknotes-plugin .settings-help-section {
    margin: var(--tn-spacing-md) 0;
    padding: var(--tn-spacing-md);
    background: var(--tn-bg-secondary);
    border-radius: var(--tn-radius-sm);
}

.tasknotes-plugin .settings-help-section h4 {
    margin: 0 0 var(--tn-spacing-xs) 0;
    font-size: var(--tn-font-size-sm);
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-text-muted);
}

.tasknotes-plugin .settings-help-section h5 {
    margin: var(--tn-spacing-sm) 0 var(--tn-spacing-xs) 0;
    font-size: var(--tn-font-size-sm);
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-text-muted);
}

.tasknotes-plugin .settings-help-section ul {
    margin: 0;
    padding-left: var(--tn-spacing-md);
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-muted);
}

.tasknotes-plugin .settings-help-section li {
    margin-bottom: var(--tn-spacing-xs);
}

.tasknotes-plugin .settings-help-section p {
    margin: var(--tn-spacing-xs) 0 0 0;
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-muted);
}

/* Help Notes - Minimal explanatory text */
.tasknotes-plugin .settings-help-note {
    margin: var(--tn-spacing-sm) 0;
    padding: var(--tn-spacing-sm) var(--tn-spacing-md);
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-muted);
    background: var(--tn-bg-secondary);
    border-radius: var(--tn-radius-sm);
}

/* Validation Notes - Subtle warning style */
.tasknotes-plugin .settings-validation-note {
    margin: var(--tn-spacing-sm) 0;
    padding: var(--tn-spacing-sm) var(--tn-spacing-md);
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-muted);
    font-style: italic;
    background: var(--tn-bg-secondary);
    border-radius: var(--tn-radius-sm);
}

/* Legacy support for old class names */
.tasknotes-plugin .settings-view__help-section {
    margin: var(--tn-spacing-md) 0;
    padding: var(--tn-spacing-md);
    background: var(--tn-bg-secondary);
    border-radius: var(--tn-radius-sm);
}

.tasknotes-plugin .settings-view__help-title {
    margin: 0 0 var(--tn-spacing-xs) 0;
    font-size: var(--tn-font-size-sm);
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-text-muted);
}

.tasknotes-plugin .settings-view__help-list {
    margin: 0;
    padding-left: var(--tn-spacing-md);
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-muted);
}

.tasknotes-plugin .settings-view__help-item {
    margin-bottom: var(--tn-spacing-xs);
}

.tasknotes-plugin .settings-view__help-note {
    margin: var(--tn-spacing-sm) 0;
    padding: var(--tn-spacing-sm) var(--tn-spacing-md);
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-muted);
    background: var(--tn-bg-secondary);
    border-radius: var(--tn-radius-sm);
}

.tasknotes-plugin .settings-view__validation-note {
    margin: var(--tn-spacing-sm) 0;
    padding: var(--tn-spacing-sm) var(--tn-spacing-md);
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-muted);
    font-style: italic;
    background: var(--tn-bg-secondary);
    border-radius: var(--tn-radius-sm);
}

/* ================================================
   FIELD MAPPING TABLE
   ================================================ */

/* Field Mapping Table */
.tasknotes-plugin .settings-view__table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--tn-spacing-md) 0;
    background: var(--tn-bg-primary);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-sm);
    overflow: hidden;
}

.tasknotes-plugin .settings-view__table-header {
    background: var(--tn-bg-secondary);
    color: var(--tn-text-normal);
    font-weight: var(--tn-font-weight-semibold);
    font-size: var(--tn-font-size-sm);
    padding: var(--tn-spacing-sm) var(--tn-spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--tn-border-color);
}

.tasknotes-plugin .settings-view__table-cell {
    padding: var(--tn-spacing-sm) var(--tn-spacing-md);
    border-bottom: 1px solid var(--tn-border-color-hover);
    vertical-align: middle;
}

.tasknotes-plugin .settings-view__table-row:last-child .settings-view__table-cell {
    border-bottom: none;
}

.tasknotes-plugin .settings-view__table-row:hover {
    background: var(--tn-interactive-hover);
}

.tasknotes-plugin .settings-view__table-input {
    width: 100%;
    padding: var(--tn-spacing-xs) var(--tn-spacing-sm);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-xs);
    background: var(--tn-bg-primary);
    color: var(--tn-text-normal);
    font-size: var(--tn-font-size-sm);
    transition: border-color var(--tn-transition-fast);
}

.tasknotes-plugin .settings-view__table-input:focus {
    outline: none;
    border-color: var(--interactive-accent);
}

/* ================================================
   STATUS AND PRIORITY LISTS
   ================================================ */

/* List Headers Row */
.tasknotes-plugin .settings-view__list-headers {
    display: grid;
    grid-template-columns: 20px 24px 1fr 1fr 80px 1fr 40px;
    gap: var(--tn-spacing-sm);
    padding: var(--tn-spacing-sm) 0;
    margin-bottom: var(--tn-spacing-xs);
    align-items: center;
    font-weight: var(--tn-font-weight-semibold);
    font-size: var(--tn-font-size-xs);
    color: var(--tn-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* User fields headers: no drag handle or color indicator columns */
.tasknotes-plugin .settings-view__list-headers.user-fields {
    grid-template-columns: 1fr 1fr 160px 80px; /* key | name | type | delete spacer */
}

.tasknotes-plugin .settings-view__column-header {
    text-align: center;
}

.tasknotes-plugin .settings-view__header-spacer {
    /* Empty spacer for alignment */
}

/* List Container */
.tasknotes-plugin .settings-view__list {
    display: flex;
    flex-direction: column;
    gap: var(--tn-spacing-xs);
    margin-bottom: var(--tn-spacing-lg);
}

/* ================================================
   LIST ITEM ROW
   ================================================ */

/* Item Row Container */
.tasknotes-plugin .settings-view__item-row {
    display: grid;
    grid-template-columns: 20px 24px 1fr 1fr 80px 1fr 40px;
    gap: var(--tn-spacing-sm);
    align-items: center;
    padding: var(--tn-spacing-sm);
    background: var(--tn-bg-primary);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-sm);
    transition: all var(--tn-transition-fast);
    cursor: move;
}

/* User fields rows: simpler grid with wider inputs */
.tasknotes-plugin .settings-view__item-row.user-fields {
    grid-template-columns: 1fr 1fr 160px 80px; /* key | name | type | delete */
    cursor: default;
}
.tasknotes-plugin .settings-view__input.key-input,
.tasknotes-plugin .settings-view__input.name-input {
    min-width: 0; /* allow flex grow */
    width: 100%;
}
.tasknotes-plugin .settings-view__input.type-select {
    min-width: 140px;
}

.tasknotes-plugin .settings-view__item-row:hover {
    background: var(--tn-interactive-hover);
    border-color: var(--tn-interactive-accent);
}

/* Drag Handle */
.tasknotes-plugin .settings-drag-handle {
    color: var(--tn-text-muted);
    cursor: grab;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    user-select: none;
    transition: color var(--tn-transition-fast);
}

.tasknotes-plugin .settings-drag-handle:hover {
    color: var(--tn-text-normal);
}

.tasknotes-plugin .settings-drag-handle:active {
    cursor: grabbing;
}

/* Drag States */
.tasknotes-plugin .settings-view__item-row.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    z-index: 1000;
}

.tasknotes-plugin .settings-view__item-row.drag-over-top {
    border-top: 2px solid var(--interactive-accent);
}

.tasknotes-plugin .settings-view__item-row.drag-over-bottom {
    border-bottom: 2px solid var(--interactive-accent);
}

/* Color Indicator */
.tasknotes-plugin .settings-view__color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--indicator-color, var(--tn-text-muted));
    border: 2px solid var(--tn-bg-primary);
    box-shadow: 0 0 0 1px var(--tn-border-color);
    flex-shrink: 0;
}

/* ================================================
   FORM INPUTS
   ================================================ */

/* General Input Styling */
.tasknotes-plugin .settings-view__input {
    padding: var(--tn-spacing-xs) var(--tn-spacing-sm);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-xs);
    background: var(--tn-bg-primary);
    color: var(--tn-text-normal);
    font-size: var(--tn-font-size-sm);
    transition: border-color var(--tn-transition-fast);
    min-height: var(--tn-input-height-sm);
}

.tasknotes-plugin .settings-view__input:focus {
    outline: none;
    border-color: var(--interactive-accent);
}

/* Specific Input Types */
.tasknotes-plugin .settings-view__input--value,
.tasknotes-plugin .settings-view__input--label {
    width: 100%;
}

.tasknotes-plugin .settings-view__input--color {
    width: 60px;
    height: 32px;
    padding: 2px;
    cursor: pointer;
    border-radius: var(--tn-radius-xs);
}

.tasknotes-plugin .settings-view__input--weight {
    width: 70px;
    text-align: center;
}

/* ================================================
   CHECKBOX - removed custom styling
   ================================================ */

/* ================================================
   BUTTONS
   ================================================ */

/* Delete Button */
.tasknotes-plugin .settings-view__delete-button {
    padding: var(--tn-spacing-xs) var(--tn-spacing-sm);
    background: var(--tn-bg-error);
    color: var(--tn-text-error);
    border: 1px solid var(--tn-text-error);
    border-radius: var(--tn-radius-xs);
    font-size: var(--tn-font-size-xs);
    font-weight: var(--tn-font-weight-medium);
    cursor: pointer;
    transition: all var(--tn-transition-fast);
    white-space: nowrap;
    min-height: var(--tn-button-height-sm);
}

.tasknotes-plugin .settings-view__delete-button:hover {
    background: var(--tn-text-error);
    color: var(--tn-bg-primary);
}

/* Use default button styling */
.tasknotes-plugin .settings-view__add-button {
    background: transparent;
    color: var(--tn-text-normal);
    border: none;
    box-shadow: none;
    padding: var(--tn-spacing-sm) var(--tn-spacing-md);
    border-radius: var(--tn-radius-sm);
    font-size: var(--tn-font-size-sm);
    font-weight: var(--tn-font-weight-medium);
    min-height: var(--tn-button-height-md);
}

.tasknotes-plugin .settings-view__add-button:hover {
    background: var(--tn-interactive-hover);
    border: none;
    box-shadow: none;
}

/* Reset Button */
.tasknotes-plugin .settings-view__reset-button {
    padding: var(--tn-spacing-sm) var(--tn-spacing-md);
    background: var(--tn-text-warning);
    color: var(--tn-bg-primary);
    border: 1px solid var(--tn-text-warning);
    border-radius: var(--tn-radius-sm);
    font-size: var(--tn-font-size-sm);
    font-weight: var(--tn-font-weight-medium);
    cursor: pointer;
    transition: all var(--tn-transition-fast);
    min-height: var(--tn-button-height-md);
}

.tasknotes-plugin .settings-view__reset-button:hover {
    background: var(--tn-text-warning);
    opacity: 0.9;
}

/* ================================================
   OBSIDIAN SETTING ITEMS (SCOPED)
   ================================================ */

/* Properly scoped settings styling - only affects TaskNotes settings */
.tasknotes-plugin .settings-view .setting-item {
    border: none;
    border-bottom: 1px solid var(--tn-border-color-hover);
    padding: var(--tn-spacing-md) 0;
    margin-bottom: 0;
}

.tasknotes-plugin .settings-view .setting-item:last-child {
    border-bottom: none;
}

.tasknotes-plugin .settings-view .setting-item-info {
    flex-grow: 1;
}

.tasknotes-plugin .settings-view .setting-item-name {
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-text-normal);
    font-size: var(--tn-font-size-base);
    margin-bottom: var(--tn-spacing-xs);
}

/* Use Obsidian's default styling for setting descriptions */

.tasknotes-plugin .settings-view .setting-item-control {
    flex-shrink: 0;
    margin-left: var(--tn-spacing-md);
}

/* Heading styles */
.tasknotes-plugin .settings-view .setting-item.setting-item-heading {
    padding-top: var(--tn-spacing-lg);
    margin-top: var(--tn-spacing-lg);
    border-top: 1px solid var(--tn-border-color);
    border-bottom: none;
    padding-bottom: var(--tn-spacing-sm);
}

.tasknotes-plugin .settings-view .setting-item.setting-item-heading:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.tasknotes-plugin .settings-view .setting-item-heading .setting-item-name {
    font-size: var(--tn-font-size-lg);
    font-weight: var(--tn-font-weight-semibold);
    color: var(--tn-text-normal);
    margin-bottom: 0;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 768px) {
    .tasknotes-plugin .settings-view {
        padding: var(--tn-spacing-sm);
    }

    .tasknotes-plugin .settings-view__tab-nav {
        gap: var(--tn-spacing-xs);
    }

    .tasknotes-plugin .settings-view__tab-button {
        padding: var(--tn-spacing-xs) var(--tn-spacing-sm);
        font-size: var(--tn-font-size-xs);
    }

    .tasknotes-plugin .settings-view__list-headers {
        grid-template-columns: 16px 20px 1fr 1fr 60px 80px 32px;
        gap: var(--tn-spacing-xs);
    }
    /* User fields responsive columns */
    .tasknotes-plugin .settings-view__list-headers.user-fields {
        grid-template-columns: 1fr 1fr 140px 60px;
    }
    .tasknotes-plugin .settings-view__item-row.user-fields {
        grid-template-columns: 1fr 1fr 140px 60px;
    }


    .tasknotes-plugin .settings-view__item-row {
        grid-template-columns: 16px 20px 1fr 1fr 60px 80px 32px;
        gap: var(--tn-spacing-xs);
        padding: var(--tn-spacing-xs);
    }

    .tasknotes-plugin .settings-view__input--color {
        width: 50px;
        height: 28px;
    }

    .tasknotes-plugin .settings-view__input--weight {
        width: 60px;
    }

    .tasknotes-plugin .settings-view__table {
        font-size: var(--tn-font-size-sm);
    }

    .tasknotes-plugin .settings-view__table-header,
    .tasknotes-plugin .settings-view__table-cell {
        padding: var(--tn-spacing-xs) var(--tn-spacing-sm);
    }
}

@media (max-width: 480px) {
    .tasknotes-plugin .settings-view__list-headers,
    .tasknotes-plugin .settings-view__item-row {
        grid-template-columns: 1fr;
        gap: var(--tn-spacing-xs);
        text-align: center;
    }

    .tasknotes-plugin .settings-view__color-indicator {
        justify-self: center;
    }

    .tasknotes-plugin .settings-view__input--color {
        justify-self: center;
    }

    .tasknotes-plugin .settings-view__delete-button {
        justify-self: center;
        max-width: 80px;
    }
}

/* ================================================
   ACCESSIBILITY & REDUCED MOTION
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    .tasknotes-plugin .settings-view__tab-button,
    .tasknotes-plugin .settings-view__item-row,
    .tasknotes-plugin .settings-view__input,
    .tasknotes-plugin .settings-view__delete-button,
    .tasknotes-plugin .settings-view__add-button,
    .tasknotes-plugin .settings-view__reset-button {
        transition: none;
    }

    .tasknotes-plugin .settings-view__tab-content--active {
        animation: none;
    }
}

/* Focus indicators for keyboard navigation */
.tasknotes-plugin .settings-view__tab-button:focus,
.tasknotes-plugin .settings-view__input:focus,
.tasknotes-plugin .settings-view__table-input:focus,
.tasknotes-plugin .settings-view__delete-button:focus,
.tasknotes-plugin .settings-view__add-button:focus,
.tasknotes-plugin .settings-view__reset-button:focus {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tasknotes-plugin .settings-view__item-row,
    .tasknotes-plugin .settings-view__table {
        border-width: 2px;
    }

    .tasknotes-plugin .settings-view__color-indicator {
        border-width: 3px;
    }

    .tasknotes-plugin .settings-view__input,
    .tasknotes-plugin .settings-view__table-input {
        border-width: 2px;
    }
}

/* Dark mode adjustments */
.theme-dark .tasknotes-plugin .settings-view__color-indicator {
    box-shadow: 0 0 0 1px var(--tn-border-color-hover);
}

.theme-dark .tasknotes-plugin .settings-view__table {
    border-color: var(--tn-border-color-hover);
}

.theme-dark .tasknotes-plugin .settings-view__item-row {
    border-color: var(--tn-border-color-hover);
}

/* ================================================
   ICS SUBSCRIPTION FORM STYLES
   ================================================ */

/* ICS Form Containers */
.tasknotes-plugin .ics-add-subscription-form {
    margin-top: var(--tn-spacing-md);
    padding: var(--tn-spacing-md);
    background: var(--tn-bg-secondary);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-md);
}

.tasknotes-plugin .ics-form-row {
    display: flex;
    align-items: center;
    gap: var(--tn-spacing-md);
    margin-bottom: var(--tn-spacing-md);
}

.tasknotes-plugin .ics-form-row:last-child {
    margin-bottom: 0;
}

.tasknotes-plugin .ics-form-row-multi {
    flex-wrap: wrap;
    gap: var(--tn-spacing-lg);
}

.tasknotes-plugin .ics-form-row-hidden {
    display: none;
}

/* ICS Form Labels */
.tasknotes-plugin .ics-form-label {
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-text-normal);
    white-space: nowrap;
    min-width: 80px;
}

/* ICS Form Inputs */
.tasknotes-plugin .ics-form-input {
    flex: 1;
    padding: var(--tn-spacing-sm);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-sm);
    background: var(--tn-bg-primary);
    color: var(--tn-text-normal);
    font-size: var(--tn-font-size-sm);
}

.tasknotes-plugin .ics-form-select {
    flex: 1;
    padding: var(--tn-spacing-sm);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-sm);
    background: var(--tn-bg-primary);
    color: var(--tn-text-normal);
    font-size: var(--tn-font-size-sm);
}

.tasknotes-plugin .ics-form-number {
    width: 80px;
    padding: var(--tn-spacing-sm);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-sm);
    background: var(--tn-bg-primary);
    color: var(--tn-text-normal);
    font-size: var(--tn-font-size-sm);
}

.tasknotes-plugin .ics-form-color {
    width: 40px;
    height: 32px;
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-sm);
    background: var(--tn-bg-primary);
    cursor: pointer;
}

/* ICS Form Groups */
.tasknotes-plugin .ics-form-group {
    display: flex;
    align-items: center;
    gap: var(--tn-spacing-sm);
}

/* ICS Form Checkboxes */
.tasknotes-plugin .ics-form-checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--tn-spacing-xs);
    cursor: pointer;
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-normal);
}

.tasknotes-plugin .ics-form-checkbox {
    margin: 0;
}

/* ICS Form Buttons */
.tasknotes-plugin .ics-form-button {
    padding: var(--tn-spacing-sm) var(--tn-spacing-lg);
    background: var(--tn-interactive-accent);
    color: var(--tn-text-on-accent);
    border: none;
    border-radius: var(--tn-radius-sm);
    font-size: var(--tn-font-size-sm);
    font-weight: var(--tn-font-weight-medium);
    cursor: pointer;
    transition: background-color var(--tn-transition-fast);
}

.tasknotes-plugin .ics-form-button:hover {
    background: var(--tn-interactive-accent-hover);
}

.tasknotes-plugin .ics-form-button:disabled {
    background: var(--tn-bg-muted);
    color: var(--tn-text-muted);
    cursor: not-allowed;
}

/* ================================================
   ICS SUBSCRIPTION LIST STYLES
   ================================================ */

/* ICS Subscription Row */
.tasknotes-plugin .ics-subscription-row {
    display: flex;
    align-items: flex-start;
    gap: var(--tn-spacing-md);
    padding: var(--tn-spacing-md);
    background: var(--tn-bg-secondary);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-md);
    margin-bottom: var(--tn-spacing-sm);
}

/* ICS Subscription Info */
.tasknotes-plugin .ics-subscription-info {
    flex: 1;
    min-width: 0;
}

.tasknotes-plugin .ics-subscription-name {
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-text-normal);
    margin-bottom: var(--tn-spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--tn-spacing-sm);
}

.tasknotes-plugin .ics-subscription-type-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: var(--tn-font-weight-bold);
    text-transform: uppercase;
    border-radius: var(--tn-radius-xs);
    line-height: 1;
}

.tasknotes-plugin .ics-subscription-type-badge.remote {
    background: var(--tn-color-blue-bg);
    color: var(--tn-color-blue);
}

.tasknotes-plugin .ics-subscription-type-badge.local {
    background: var(--tn-color-green-bg);
    color: var(--tn-color-green);
}

.tasknotes-plugin .ics-subscription-url {
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-muted);
    margin-bottom: var(--tn-spacing-xs);
    word-break: break-all;
}

.tasknotes-plugin .ics-subscription-meta {
    font-size: var(--tn-font-size-xs);
    color: var(--tn-text-faint);
}

.tasknotes-plugin .ics-subscription-error {
    font-size: var(--tn-font-size-xs);
    color: var(--tn-color-red);
    margin-top: var(--tn-spacing-xs);
}

/* ICS Subscription Actions */
.tasknotes-plugin .ics-subscription-actions {
    display: flex;
    flex-direction: row;
    gap: var(--tn-spacing-xs);
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.tasknotes-plugin .ics-subscription-toggle,
.tasknotes-plugin .ics-subscription-refresh,
.tasknotes-plugin .ics-subscription-edit,
.tasknotes-plugin .ics-subscription-delete {
    padding: var(--tn-spacing-xs) var(--tn-spacing-sm);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-sm);
    font-size: var(--tn-font-size-xs);
    cursor: pointer;
    transition: all var(--tn-transition-fast);
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}

.tasknotes-plugin .ics-subscription-toggle.enabled {
    background: var(--tn-color-green-bg);
    color: var(--tn-color-green);
    border-color: var(--tn-color-green);
}

.tasknotes-plugin .ics-subscription-toggle.disabled {
    background: var(--tn-bg-muted);
    color: var(--tn-text-muted);
}

.tasknotes-plugin .ics-subscription-refresh {
    background: var(--tn-color-blue-bg);
    color: var(--tn-color-blue);
    border-color: var(--tn-color-blue);
}

.tasknotes-plugin .ics-subscription-refresh:hover {
    background: var(--tn-color-blue);
    color: var(--tn-text-on-accent);
}

.tasknotes-plugin .ics-subscription-edit {
    background: var(--tn-bg-secondary);
    color: var(--tn-text-normal);
}

.tasknotes-plugin .ics-subscription-edit:hover {
    background: var(--tn-interactive-hover);
    border-color: var(--tn-border-color-hover);
}

.tasknotes-plugin .ics-subscription-delete {
    background: var(--tn-color-red-bg);
    color: var(--tn-color-red);
    border-color: var(--tn-color-red);
}

.tasknotes-plugin .ics-subscription-delete:hover {
    background: var(--tn-color-red);
    color: var(--tn-text-on-accent);
}

/* ================================================
   DEFAULT PROJECTS SETTING
   ================================================ */

.tasknotes-plugin .default-projects-container {
    margin-top: var(--tn-spacing-sm);
}

.tasknotes-plugin .default-projects-list {
    margin-bottom: var(--tn-spacing-sm);
    min-height: 20px;
}

.tasknotes-plugin .default-project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tn-spacing-xs) var(--tn-spacing-sm);
    margin-bottom: var(--tn-spacing-xs);
    background: var(--tn-bg-secondary);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-sm);
    gap: var(--tn-spacing-sm);
}

.tasknotes-plugin .default-project-info {
    flex: 1;
    min-width: 0;
}

.tasknotes-plugin .default-project-name {
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-text-normal);
    display: block;
}

.tasknotes-plugin .default-project-path {
    font-size: var(--tn-font-size-xs);
    color: var(--tn-text-muted);
    margin-top: 2px;
}

.tasknotes-plugin .default-project-remove {
    background: none;
    border: none;
    color: var(--tn-text-muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: var(--tn-radius-xs);
    transition: all var(--tn-transition-fast);
    flex-shrink: 0;
}

.tasknotes-plugin .default-project-remove:hover {
    color: var(--tn-color-red);
    background: var(--tn-color-red-bg);
}

/* Use default button styling */
.tasknotes-plugin .default-project-add-btn {
    background: transparent;
    color: var(--tn-text-normal);
    border: none;
    box-shadow: none;
    padding: var(--tn-spacing-xs) var(--tn-spacing-sm);
    border-radius: var(--tn-radius-sm);
    font-size: var(--tn-font-size-sm);
}

.tasknotes-plugin .default-project-add-btn:hover {
    background: var(--tn-interactive-hover);
    border: none;
    box-shadow: none;
}

.tasknotes-plugin .default-projects-empty {
    color: var(--tn-text-muted);
    font-style: italic;
    padding: var(--tn-spacing-sm);
    text-align: center;
    border: 1px dashed var(--tn-border-color);
    border-radius: var(--tn-radius-sm);
    background: var(--tn-bg-muted);
}